package com.devfest.wishmaster.gui;

import java.util.List;

import com.devfest.wishmaster.model.User;
import com.devfest.wishmaster.model.WishList;

import android.app.Activity;
import android.app.Application;

public class MyApplication extends Application {

	private static MyApplication instance;
	public User currentUser;
	public String userFullName;
	public List<WishList> wishLists;
	
	public static int selectedWishList;
	private Activity currentActivity;
	
	public Activity getActiveActivity() {
		return currentActivity;
	}
	
	public void setActivity(Activity activity) {
		currentActivity = activity;
	}

	public static MyApplication getInstance() {
		if (instance == null) {
			synchronized (MyApplication.class) {
				if (instance == null) {
					new MyApplication();
				}
			}
		}
		return instance;
	}

	@Override
	public void onCreate() {
		super.onCreate();

		instance = this;
		currentUser = null;
	}
}